package com.hoopchina.weibo;
import com.hoopchina.weibo.http.HttpClient;
/**
 * 
 * @author neusoft
 *
 */
/**
 * @author Yusuke Yamamoto - yusuke at mac.com
 */
/*protected*/ class WeiboSupport {
	protected HttpClient http;
    protected String source = Configuration.getSource();;
	public static String CONSUMER_KEY = "";
	public static String CONSUMER_SECRET = "";

    /*package*/ WeiboSupport(int type){
        this(null, null,type);    	
    }
    /*package*/ WeiboSupport(String userId, String password,int type){
    	switch(type)
    	{
    		case WeiboType.SinaType:
    			CONSUMER_KEY = "2274436633";
    			CONSUMER_SECRET = "9814ebbb61f33b1128509d4a4e538111";	
    	        break;
    		case WeiboType.NetEaseType:
    			CONSUMER_KEY = "EsZa3AtaHWsYK9Cf";
    			CONSUMER_SECRET = "jKmo3eaiNZDRATrwxars8kFLv4nElnVN";
    	        break;
    		case WeiboType.TencentType:
    			CONSUMER_KEY = "6ddca425f67f4a97a8e349cbb50e8d57";
    			CONSUMER_SECRET = "d009646a2d70d0fdb7e57d33c6347c32"; 	
    	        break;
    		case WeiboType.SohuType:
    			CONSUMER_KEY = "GuWDhi4j6OyZHD0R5ahr";
    			CONSUMER_SECRET = "Dmq$4GJYKm^dNOe-x)WjVdaDudy*FYn#khqcV^P^";	
    	        break;
    		case WeiboType.RenrenType:
    			CONSUMER_KEY = "8e209d1a415a4d9d8f825642eedfb9d1";
    			CONSUMER_SECRET = "75cb8cf0c5e149c9ba8ed0f733aadb5b";
    			break;
    	}
		System.setProperty("weibo.oauth.consumerKey",
				CONSUMER_KEY );
		System.setProperty("weibo.oauth.consumerSecret",
				CONSUMER_SECRET );
		System.setProperty("http.keepAlive", "false");
        http = new HttpClient(type);
    }
}
